import request from '@/utils/request'
import request1 from "../../utils/request1";
// 查询批单日志列表
export function listApproveLog(query) {
  return request({
    url: '/insurance/approveLog/list',
    method: 'get',
    params: query
  })
}
//查询保单数据
export function get_insure(query) {
  return request1({
    url: '/Insurance/get_insure',
    method: 'get',
    params: query
  })
}
//查询批单数据
export function get_approve_user(query) {
  return request1({
    url: '/Insurance/get_approve_user',
    method: 'get',
    params: query
  })
}
// 查询批单日志详细
export function getApproveLog(id) {
  return request({
    url: '/insurance/approveLog/' + id,
    method: 'get'
  })
}

// 新增批单日志
export function addApproveLog(data) {
  return request({
    url: '/insurance/approveLog',
    method: 'post',
    data: data
  })
}
//批量上传
export function addapprove(data) {
  return request({
    url: '/insurance/user/approve',
    method: 'post',
    data: data,
    // responseType: 'arraybuffer'
    // responseType: "blob",
    // headers:{
    //   "Content-Type":"application/json;application/vnd.ms-excel"
    // }
  })
}
// 修改批单日志
export function updateApproveLog(data) {
  return request({
    url: '/insurance/approveLog',
    method: 'put',
    data: data
  })
}

// 删除批单日志
export function delApproveLog(id) {
  return request({
    url: '/insurance/approveLog/' + id,
    method: 'delete'
  })
}

// 导出批单日志
export function exportApproveLog(query) {
  return request({
    url: '/insurance/approveLog/export',
    method: 'get',
    params: query
  })
}
//批单
export function approve(data){
  return request({
    url: '/insurance/approve/approve',
    method: 'post',
    data: data
  })
}
